﻿/// <summary>
/// 主管理类   类似单例作用
/// </summary>
public class ZMgr
{
    public static bool IsInit = false;
    /// <summary>
    /// 时间工具
    /// </summary>
    public static TimeMgr TimeMgr;
    /// <summary>
    /// 定时器
    /// </summary>
    public static TimerMgr TimerMgr;
    /// <summary>
    /// 资源管理
    /// </summary>
    public static ResourceMgr ResourceMgr;
    /// <summary>
    /// 界面管理
    /// </summary>
    public static UIMgr UIMgr;
    /// <summary>
    /// 界面中心
    /// </summary>
    public static FaceCenter FaceCenter;
    ///// <summary>
    ///// 场景管理
    ///// </summary>
    public static SceneMgr SceneMgr;
    /// <summary>
    /// 应用程序管理
    /// </summary>
    public static AppMgr AppMgr;
    /// <summary>
    /// 镜头动画管理
    /// </summary>
    public static CameraMovieMgr CameraMovieMgr;
    /// <summary>
    /// 音效管理
    /// </summary>
    public static SoundMgr SoundMgr;
    /// <summary>
    /// 3D锁屏管理
    /// </summary>
    public static LockUIMgr LockUIMgr;
    /// <summary>
    /// 场景2d背景管理
    /// </summary>
    public static SceneBgMgr SceneBgMgr;
    /// <summary>
    /// 加载等待界面管理
    /// </summary>
    public static LoadingWaitMgr LoadWaitMgr;
    /// <summary>
    /// 等待服务器数据
    /// </summary>
    public static WaitServerMgr WaitServerMgr;
    /// <summary>
    /// 新手指引管理
    /// </summary>
    public static GuideMgr GuideMgr;
    /// <summary>
    /// 小红点管理
    /// </summary>
    public static NotifyMgr NotifyMgr;

    public static void Init()
    {
        if (!IsInit)
        {
            IsInit = true;
            TimeMgr = new TimeMgr();
            TimerMgr = new TimerMgr();
            NotifyMgr = new NotifyMgr();
            ResourceMgr = new ResourceMgr();
            SoundMgr = new SoundMgr();
            SceneBgMgr = new SceneBgMgr();
            CameraMovieMgr = new CameraMovieMgr();
            UIMgr = new UIMgr();
            SceneMgr = new SceneMgr();
            AppMgr = new AppMgr();
            GuideMgr = new GuideMgr();
            LockUIMgr = new LockUIMgr();
            WaitServerMgr = new WaitServerMgr();
            LoadWaitMgr = new LoadingWaitMgr();
            FaceCenter = new FaceCenter();

            UpdateMgr.GetSingleton().AddUpdate(TimerMgr);
            UpdateMgr.GetSingleton().AddUpdate(SoundMgr);
        }
    }
}